package com.bluemoon.bmwalk.common.jacoco.dto;

import java.util.ArrayList;
import java.util.List;

import lombok.Data;
/**
 * 包
 * 	<package name="cn/com/bluemoon/demo/vo">
 * 		...
		<counter type="INSTRUCTION" missed="151" covered="18" />
		<counter type="BRANCH" missed="30" covered="0" />
		<counter type="LINE" missed="2" covered="2" />
		<counter type="COMPLEXITY" missed="21" covered="5" />
		<counter type="METHOD" missed="6" covered="5" />
		<counter type="CLASS" missed="0" covered="1" />
	</package>
 * 
 * @author: liaozhioyng
 * @create: 2024-01-03
 */
@Data
public class Package {

    private String name;

    private final List<Clazz> classes = new ArrayList<>();

    private final List<Counter> packageCounters = new ArrayList<>();

    private final List<Sourcefile> sourcefiles = new ArrayList<>();

    private Coverage packageCoverage;

    public void addClass(Clazz clazz) {
        classes.add(clazz);
    }

    public void addCounter(Counter counter) {
        packageCounters.add(counter);
    }

    public void addSourcefile(Sourcefile sourcefile) {
    	sourcefiles.add(sourcefile);
    }

}
